package main

import (
	"fmt"
	. "leetcode/basicstruct"
)

func main() {
	var head *ListNode
	head = CreateList([]int{1, 2, 3, 4, 5, 6})
	fmt.Println(TraverseList(head))

	n1 := &TreeNode{}
	n1.Val = 1
	n2 := &TreeNode{}
	n2.Val = 2
	n3 := &TreeNode{}
	n3.Val = 3
	n4 := &TreeNode{}
	n4.Val = 4
	n5 := &TreeNode{}
	n5.Val = 5
	n6 := &TreeNode{}
	n6.Val = 6
	n7 := &TreeNode{}
	n7.Val = 7

	fmt.Println(TraverseTree(n1))

	n1.Left = n2
	n1.Right = n3
	fmt.Println(TraverseTree(n1))

	n2.Right = n4
	n3.Left = n5
	n3.Right = n6
	n5.Left = n7

	fmt.Println(TraverseTree(n1))

}
